package com.example.algorithm.no0002;

import com.example.algorithm.no0002.solution.Solution1;

/**
 * @Description 解答测试
 * @ClassName SolutionTest
 * @Author Administrator
 * @Date 2020/5/16 12:54
 * @Version 1.0.0
 */
public abstract class SolutionTest {

    public static void main(String[] args) {
        ListNode l1 = new ListNode(2);
        ListNode l1_24 = new ListNode(4);
        ListNode l1_243 = new ListNode(3);
//        l1_24.setNext(l1_243);
//        l1.setNext(l1_24);
        l1_24.next = l1_243;
        l1.next = l1_24;

        ListNode l2 = new ListNode(5);
        ListNode l2_56 = new ListNode(6);
        ListNode l2_564 = new ListNode(8);
//        l2_56.setNext(l2_564);
//        l2.setNext(l2_56);
        l2_56.next = l2_564;
        l2.next = l2_56;

        System.out.println("入参: l1: " + ListNode.toStr(l1) + ", l2: " + ListNode.toStr(l2));
        Solution solution = new Solution1();
        ListNode result = solution.addTwoNumbers(l1, l2);

        System.out.println(ListNode.toStr(result));
    }
}
